
function modifyEventForm() {
	window.openDialog("chrome://valami/content/modifyEventForm.xul", "_blank", "chrome,modal,centerscreen,resizable=yes");
}

function openWindow() {
	window.openDialog("chrome://valami/content/calendar1.xul", "_blank", "chrome,modal,centerscreen,resizable=yes");
}
 
function newEventForm() {
	window.openDialog("chrome://valami/content/newEventForm.xul", "_blank", "chrome,modal,centerscreen,resizable=yes");
}

function deleteEventForm() {
	window.openDialog("chrome://valami/content/deleteEventForm.xul", "_blank", "chrome,modal,centerscreen,resizable=yes");
}
/*
function startTime() {
	var today=new Date();
	var datum=today.toString();
	self.status = today.toString();
	document.getElementById('txt').label=today.toString();
	t=setTimeout('startTime()',500);
	return today.toString();
}

function newCategory() {
	window.openDialog("chrome://valami/content/newCategory.xul", "_blank", "chrome,modal,centerscreen,resizable=yes");
}


function Csokkent() {
	Init(honap,het-1, nap);
}

function Novel() {
	Init(honap,het+1, nap);
}

function setToday() {
  var d = new Date()
  dateBox.value = (d.getMonth() + 1)
    + "/" + d.getDate()
    + "/" + d.getFullYear()
  refresh()
  }
*/
	
	
function Init() {
	/*dateBox = document.getElementById("date-text")
	dayBox = document.getElementById("day-box")
	status = document.getElementById("status")
    setToday(); */

	var root = document.getElementById('divMain');		
	var grid1 = document.createElement('grid');
	grid1.className="scrollable";
	
	var rows = document.createElement('rows');
	var row = document.createElement('row');
	var label = document.createElement('label');
	label.setAttribute("value", "Day : ");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Sunday");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Monday");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Tuesday");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Wednesday");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Thursday");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Friday");
	row.appendChild(label);
	var label = document.createElement('label');
	label.setAttribute("value", "Saturday");
	row.appendChild(label);
	rows.appendChild(row);
	grid1.appendChild(rows);
	root.appendChild(grid1);

	var grid = document.createElement('grid');
		grid.className="scrollable";
	var tbo = document.createElement('columns');	
	for (var i = 0;i<8;i++) {
		var column = document.createElement('column');
		tbo.appendChild(column);
	}
	grid.appendChild(tbo);
	
	for (var j = 0; j< 24; j++) {
		var separator = document.createElement('menuseparator');
		var rows = document.createElement('rows');	
		var row = document.createElement('row');
		var button = document.createElement('button');
		button.className="buttonsetup";		
		button.setAttribute("label", j + ":00");
		row.appendChild(button);
		rows.appendChild(row);
		/*for (var z = 0;z<8;z++) {	
			var row = document.createElement('row');
			var button = document.createElement('button');
			button.className="buttonsetup";		
			button.setAttribute("oncommand", "newEventForm();");
			button.setAttribute("label","A new Button");
			row.appendChild(button);
		}
		rows.appendChild(row);*/
		rows.appendChild(separator);	
		grid.childNodes[j].appendChild(rows);
		root.appendChild(grid.childNodes[j]);
   }
   
 }
	
